<template>
  <div>
    <div  v-loading.fullscreen="loading"  element-loading-text="加载中...">
    
  </div>
  </div>
</template>

<script>
import isIEBrowser from '@/utils/isIe'
//超出指定行数自动隐藏文字
export default {
  name: "topLoading",
  data(){
    return {
      loading: false
    }
  },
  watch:{
    '$store.state.user.topLoadingStatus'(newV){
      if(newV){
        if(isIEBrowser()){
          return
        }
        this.loading = true;
      }else{
        this.loading = false;
        try {
          document.getElementsByClassName("is-fullscreen")[0].style.display = "none";
          setTimeout(()=>{
            document.getElementsByClassName("is-fullscreen")[0].style.display = "none";
            setTimeout(()=>{
              document.getElementsByClassName("is-fullscreen")[0].style.display = "none";
            },300)
          },300)
        } catch (error) {
          console.log(error)
        }
      }
    }
  },
}
</script>

<style lang="scss" scoped>

</style>
